/* Autrement Dit - reprise du template Themler « psy_ss_contenue5 » (mesures relevées sur l'ancien site). */
:root {
  --bleu: #2d53a4;
  --bleu-titre: #2d9fcd;
  --bleu-pied: #627ebb;
  --bleu-pale: rgba(234, 246, 250, .95);
  --orange: #f0ad4e;
  --texte: #555;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--texte); font: 16px/1.4286 Arial, "Arial Unicode MS", Helvetica, sans-serif; }
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--bleu-titre); }

/* ---------- En-tête ---------- */
.entete { position: relative; max-width: 1246px; margin: 0 auto; padding: 0 20px; }
.entete-haut { position: relative; max-width: 1206px; margin: 0 auto; height: 105px; }
.logo { position: absolute; left: 0; top: 0; }
.logo img { display: block; width: 328px; height: auto; }
.facebook { position: absolute; right: 66px; top: 20px; line-height: 0; }
.bouton-menu { display: none; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.menu a {
  display: block; padding: 10px; font-size: 15px; line-height: 21.43px; font-style: italic; letter-spacing: 1px;
  color: #777; text-decoration: none;
}
.menu a:hover, .menu a.actif { color: var(--orange); }
.vague { height: 94px; background: url(../img/vague.png) no-repeat center / 100% 100%; }

/* ---------- Contenu ---------- */
.contenu { overflow: hidden; padding-bottom: 20px; }
.texte p { margin: 0 0 10px; }

/* Bloc « Présentation » (accueil) */
.presentation { position: relative; width: 1100px; max-width: calc(100% - 40px); margin: 155px auto 120px; display: flex; align-items: flex-start; }
.presentation-fond {
  position: absolute; left: 51px; right: -78px; top: -152px; bottom: 113px; z-index: 0;
  background: var(--bleu-pale); box-shadow: 0 20px 50px rgba(0, 0, 0, .15), 0 7px 5px 3px rgba(0, 0, 0, .11);
}
.presentation-photo { position: relative; z-index: 2; flex: 0 0 563px; width: 563px; height: 459px; object-fit: cover; }
.presentation-carte {
  position: relative; z-index: 3; flex: 0 0 563px; width: 563px; min-height: 459px; margin: 99px 0 0 -27px; padding: 2em;
  background: #fff; box-shadow: 0 20px 100px rgba(0, 0, 0, .35); color: #333; line-height: 24px;
}
.presentation-titre { margin: 5px 0 29px; font-size: 20px; line-height: 28.57px; font-weight: 400; font-style: italic; color: var(--bleu-titre); }
.presentation-carte .texte p { margin: 0 0 24px; }

/* Bloc « En-tête de page » (photo + titre dans l'encadré bleu) */
.entete-page { position: relative; width: 1204px; max-width: calc(100% - 40px); height: 314px; margin: 52px auto 40px; }
.entete-photo { position: absolute; left: 0; top: 0; width: 693px; height: 314px; object-fit: cover; }
.entete-boite { position: absolute; left: 633px; right: 0; top: 32px; height: 250px; padding: 57px 60px; background: var(--bleu); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.entete-boite h1 { margin: 0; font-size: 30px; line-height: 42.86px; font-weight: 400; }
.entete-boite .trait { display: block; width: 75%; margin: 26px 0 0 auto; border-top: 4px solid #fff; }

/* Bloc « Texte » */
.bloc-texte { max-width: 1126px; margin: 30px auto; padding: 0 40px; text-align: justify; }
.entete-page + .bloc-texte { margin-top: 100px; }
.bloc-texte .texte p { margin: 0 0 46px; }
.bloc-texte .texte p:last-child { margin-bottom: 0; }
.bloc-texte h2 { color: var(--bleu-titre); font-weight: 400; font-style: italic; font-size: 22px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--bleu-pied); color: #fff; margin-top: 20px; }
.pied-interieur { max-width: 1206px; margin: 0 auto; padding: 3px 20px 6px; display: flex; align-items: center; gap: 40px; min-height: 79px; flex-wrap: wrap; }
.pied-element { display: flex; align-items: center; gap: 26px; color: #fff; text-decoration: none; font-size: 16px; line-height: 22.86px; }
.pied-element img { width: 70px; height: 70px; flex: none; }
.pied-element.telephone span { font-size: 24px; }
.pied-element.adresse { margin-left: 20px; gap: 22px; }
.pied a.pied-element:hover span { text-decoration: underline; }
.copyright { margin: 0 0 0 auto; font-size: 10px; line-height: 14.29px; font-weight: 700; }

/* ---------- Animations au chargement (reprises de l'ancien site Themler / animate.css) ---------- */
@keyframes rollIn {
  from { opacity: 0; transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to { opacity: 1; transform: none; }
}
.logo img { animation: rollIn 1s both; }                               /* titre « Autrement Dit » */
.facebook { animation: fadeIn 1s 1s both; }
.pied-element { animation: fadeInUp 1s both; }
.pied-element.adresse { animation-delay: 1s; }
.pied-element.email { animation-delay: 2s; }
/* Comme l'ancien site, les animations sont jouées même si Windows demande de réduire les animations. */

/* Agrandissement des photos (non utilisé ici, gardé pour le moteur commun) */
.visionneuse { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; flex-direction: column; }
.visionneuse img { max-width: calc(100vw - 120px); max-height: calc(100vh - 110px); }
.visionneuse .legende-v { color: #eee; }
.visionneuse button { position: absolute; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 30px; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; }
.visionneuse .fermer { top: 15px; right: 15px; } .visionneuse .prec { left: 15px; } .visionneuse .suiv { right: 15px; }

/* Bouton « revenir en haut » */
.remonter {
  position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 46px; height: 46px; border-radius: 50%;
  background: var(--bleu); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.remonter::before { content: ""; position: absolute; left: 16px; top: 19px; width: 12px; height: 12px; border-left: 3px solid #fff; border-top: 3px solid #fff; transform: rotate(45deg); }
.remonter.visible { opacity: 1; visibility: visible; }

/* ---------- Tablettes ---------- */
@media (max-width: 1240px) {
  .presentation { width: auto; margin-left: 40px; margin-right: 60px; }
  .presentation-photo { flex: 1 1 50%; width: 50%; }
  .presentation-carte { flex: 1 1 50%; width: 50%; }
  .entete-photo { width: 58%; }
  .entete-boite { left: 52%; padding: 40px; }
}
/* ---------- Téléphones ---------- */
@media (max-width: 767px) {
  .entete { padding: 0 16px; }
  .entete-haut { height: auto; text-align: center; padding-top: 6px; }
  .logo { position: static; display: inline-block; }
  .logo img { width: 240px; }
  .facebook { right: 0; top: 10px; }
  .bouton-menu {
    display: flex; align-items: center; gap: 8px; margin: 6px auto; padding: 6px 16px; border: 1px solid #ccd; border-radius: 20px;
    background: #fff; color: #777; font: italic 15px Arial, sans-serif; letter-spacing: 1px; cursor: pointer;
  }
  .bouton-menu span { width: 21px; height: 14px; background: url(../img/menu.png) no-repeat center / 21px 14px; }
  .menu { display: none; }
  .menu.ouvert { display: block; }
  .menu ul { flex-direction: column; align-items: center; }
  .vague { height: 40px; }
  .presentation { display: block; margin: 20px 16px 40px; max-width: none; }
  .presentation-fond { left: -16px; right: -16px; top: -10px; bottom: auto; height: 260px; }
  .presentation-photo { width: 100%; height: 260px; }
  .presentation-carte { width: auto; min-height: 0; margin: -40px 12px 0; padding: 1.4em; }
  .entete-page { width: auto; height: auto; margin: 16px; max-width: none; }
  .presentation-carte p, .bloc-texte, .bloc-texte p { text-align: left !important; }
  .bloc-texte .texte p { margin-bottom: 16px; }
  .entete-page + .bloc-texte { margin-top: 30px; }
  .entete-photo { position: static; width: 100%; height: 200px; display: block; }
  .entete-boite { position: relative; left: auto; top: auto; height: auto; margin: -2em 5% 0; padding: 26px 24px; }
  .entete-boite h1 { font-size: 24px; line-height: 1.3; }
  .bloc-texte { padding: 0 18px; margin: 20px auto; }
  .pied-interieur { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 20px; }
  .pied-element.adresse { margin-left: 0; }
  .pied-element img { width: 48px; height: 48px; }
  .copyright { margin: 6px 0 0; }
  .remonter { right: 12px; bottom: 16px; }
}
