/*
Theme Name: Dawson Child
Theme URI: http://example.com
Description: Thème enfant pour Dawson
Author: Ton Nom
Template: dawson
Version: 1.0.0
*/

/* -----------------------
   Import Google Fonts
------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;700&display=swap');

/* -----------------------
   Titres de pages et titre du site (Anton)
------------------------*/
.wp-block-post-title,
.site-title {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* -----------------------
   Texte principal (Inter)
------------------------*/
body, p, li, span, a, div {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-optical-sizing: auto;
}

/* -----------------------
   Conteneur pour l'image aléatoire
------------------------*/
.random-featured-image-container {
    width: 100%;
    max-height: 1200px;
    margin: 0 auto;
    overflow: hidden;
    text-align: center;
}

.random-featured-image-container img {
    height: auto;
    max-height: 1200px;
    width: auto;
    max-width: 100%;
    display: inline-block;
}

/* -----------------------
   Colonnes Dawson enfant - alignement identique au parent
------------------------*/
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.wp-block-column {
    flex: 1;
    min-width: 0;
}

/* -----------------------
   Header contact : mail + icône Instagram
------------------------*/
.header-contact {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
}

.header-contact .wp-block-column {
    flex: 0 1 auto !important;
    margin: 0 !important;
}

.header-contact img {
    max-width: 45px !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* ===== Menu gauche fixe Dawson ===== */

/* Grand écran (≥1024px) : sticky menu fixe, pas de scroll inutile */
@media (min-width: 1024px) {
  .wp-site-blocks > .wp-block-columns > .wp-block-column:first-child {
      position: sticky;
      top: 0;
      max-height: 100vh;    /* limite à la hauteur de la fenêtre */
      overflow-y: visible;  /* scroll seulement si dépassement réel */
  }
}

/* Petit écran ou fenêtre basse : scroll si menu trop grand */
@media (max-height: 900px) {
  .wp-site-blocks > .wp-block-columns > .wp-block-column:first-child {
      max-height: 90vh;  /* limite le menu à 90% de la fenêtre */
      overflow-y: auto;   /* scroll si contenu dépasse */
  }
}

/* -----------------------
   CV list
------------------------*/
.cv-list {
    margin: 0;
}

.cv-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: start;
    margin-bottom: 1em;
}

.cv-year {
    font-weight: 700;
}

.cv-text {
    line-height: 1.5;
}


/* -----------------------
   Galeries centrées sur mobile
------------------------*/

@media (max-width: 768px) {

  .wp-block-gallery,
  .wp-block-image,
  .blocks-gallery-grid {
      margin-left: auto;
      margin-right: auto;
      text-align: center;
  }

}

/* Images responsive mobile */

@media (max-width: 768px) {

  img {
      max-width: 100%;
      height: auto;
  }

}

