
/* ==========================================================================
   pageAccueil_responsive.css
   Mobile-first responsive stylesheet layered on top of the original styles.
   You can include it AFTER pageAccueil.css to override only where needed.
   ========================================================================== */

/* 1) Global resets & helpers */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --radius: 12px;
  --max-content: 1200px;
  --shadow-soft: 0 6px 20px rgba(0,0,0,.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2) Page */


/* Optional container to limit max width */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* 3) Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-5);
  flex-wrap: wrap;
}

.left,
.right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.search_logo {
  height: 72px; /* fluid-ish; overridden on larger screens */
  padding: 0 var(--space-5);
}

/* Search form: remove absolute positioning, make it flow & shrink on small screens */
.search_form {
  display: flex;
  align-items: center;
  height: 48px;
  position: static;         /* override right: -600px */
  right: auto;
  flex: 1 1 280px;
  max-width: 520px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  background: #f1f1f1;
  padding-right: 2px; /* room for button overlap */
}

.search_form:focus-within {
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  background-color: #f7f7f7;
}

.recherche {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: none;
  border-radius: 24px 0 0 24px;
  background-color: transparent;
  font-size: 1rem;
}

.recherche:focus-visible {
  outline: none;
}

.button {
  border: none;
  padding: 0;
  border-radius: 0 24px 24px 0;
  cursor: pointer;
  background: transparent;
}

.imgButton {
  background: transparent;
  width: 48px;
  height: 48px;
  border-radius: 0 24px 24px 0;
  padding: 6px;
}

/* 4) Main content */
.regroupement_dossier {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;    /* allow wrapping for smaller screens */
  gap: 20px;
  margin: 0 var(--space-5);
}
.wrapper{
  min-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2rem;
  padding:2rem 1rem 3rem;
}

.dossier_logo,
.dossier {
  background-color: rgba(18, 94, 48, 0.9);
  border-radius: 20px;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 10px 12px 14px;
  margin: 10px;
  flex: 1 1 320px;   /* flexible card with a reasonable min width */
  max-width: 100%;
}

.dossier_logo { padding: 10px; }

.dossier_img { width: 100%; }

.imgGateauAnnif35 { height: auto; max-height: 130px; }

.titre_dossier {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
  margin: 10px 0;
  text-align: center;
}

.main_fichier {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.icone {
  background-color: #fff;
  border-radius: 10px;
  height: 45px;
  width: 45px;
  padding: 5px;
  transition: transform .3s ease, box-shadow .3s ease;
}

.icone:hover, .fichier:hover {
  transform: scale(1.06);
  color: #fff;
}

.fichier {
  background-color: transparent;
  border-radius: 10px;
  padding: 6px 10px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(16px, 2.2vw, 22px);
  transition: color .3s ease, transform .3s ease;
  position: relative;
}

.nouvelle_version {
  background-color: #A9CF37;
  color: #125e30;
  padding: 4px 10px;
  font-size: 0.9rem;
  border-radius: 999px;
  position: absolute;
  margin-left: 10px;
  font-weight: 900;
}

/* Video becomes fluid */
.video {
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
  margin: 6px;
}

/* Clean up duplicate .losange rules & make it responsive */
.losange {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 40px;
  flex-wrap: wrap;
}

/* 5) Scrolling banner */
.bandeau {
  width: auto;
  overflow: hidden;
  height: 48px;
  background-color: #f1f1f1;
  padding-left: 50%;
  margin: 20px 30px;
}

.actu {
  display: inline-block;
  height: 48px;
  line-height: 48px;
  white-space: nowrap;
  padding-right: 100%;
  animation: actu 20s linear infinite;
}

.actu_titre {
  display: inline-block;
  padding: 0 22px;
  font-size: clamp(16px, 2.2vw, 22px);
  color: #125e30;
  text-decoration: none;
}

@keyframes actu {
  0% { transform: translate3d(0,0,0); visibility: visible; }
  100% { transform: translate3d(-100%,0,0); }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .actu { animation-duration: 0.001ms; animation-iteration-count: 1; }
}



.footer_logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer_logo_img {
  height: 48px;
}

/* 7) Visibility tweaks */
.losange_desktop { display: none; }  /* hide desktop-only by default; will show on larger screens */

/* 8) Breakpoints (mobile-first) */

/* ≥ 600px (small tablets) */
@media screen and (min-width: 600px) {
  .search_logo { height: 80px; }
  .header { justify-content: center; }
}

/* ≥ 768px (tablets) */
@media screen and (min-width: 768px) {
  .header { justify-content: space-between; }
  .search_logo { height: 90px; }
  .actu_titre { padding: 0 26px; }
}

/* ≥ 992px (small laptops) */
@media screen and (min-width: 992px) {
  .dossier_logo, .dossier { flex: 1 1 380px; }
  .losange_desktop { display: initial; }
  .search_form { max-width: 560px; }
}

/* ≥ 1200px (laptops/desktops) */
@media screen and (min-width: 1200px) {
  .dossier_logo, .dossier { flex: 1 1 420px; }
  .search_logo { height: 100px; }
}

/* ≥ 1500px (large desktops) */
@media screen and (min-width: 1500px) {
  .container { max-width: 1320px; }
}

/* Ultra-wide screens */
@media screen and (min-width: 2000px) {
  .footer { position: relative; bottom: 0; }
}


/* === User-requested fixes (2025-09-05) === */

/* 1) Icônes Google G‑Suite & Logiciels en LIGNE */
.dossier_logo .main_icone,
.dossier .main_icone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;        /* rester sur une seule ligne sur desktop */
  /*overflow-x: auto;         /* scroll horizontal si ça déborde sur petits écrans */
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
/* éviter que les images rétrécissent de travers */
.main_icone .icone {
  flex: 0 0 auto;           /* largeur fixe, pas de shrink */
  height: 45px;
  width: 45px;
  object-fit: contain;
}

/* 2) "Mission – Vision – Valeurs" sur la même ligne */
.special_ligne {
  display: flex !important;   /* forcer le display flex */
  flex-direction: row !important;
  gap: 15px;
  flex-wrap: nowrap !important;
  justify-content: center;
  align-items: center;
  overflow-x: auto;           /* scroll si écran trop étroit */
  scrollbar-width: thin;
}
/* rendre les liens/blocs uniformes en ligne */
.special_ligne > a.fichier,
.special_ligne > .fichier {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;        /* pas de retour à la ligne dans les libellés */
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
}

/* 3) Image entre Google_GSuite et Logiciel : conserver ratio */
.dossier_img,
.img-keep-ratio,
.between-gsuite-logiciel img {
  width: 100%;
  height: auto;
  object-fit: contain;        /* ne jamais déformer */
  aspect-ratio: auto;         /* laisser le navigateur calculer le ratio */
}

/* Sur très grands écrans, autoriser le wrap pour une meilleure répartition si souhaité */
@media (min-width: 1400px) {
  .dossier_logo .main_icone,
  .dossier .main_icone {
    flex-wrap: nowrap; /* conserver en ligne sur desktop XXL (demande utilisateur) */
  }
}


/* === Refinement (2025-09-05): Better MVV layout + fit-content zones === */

/* 1) "Mission – Vision – Valeurs" : grid cards, clean & ergonomic
      - On desktop: 3 columns (same line)
      - On tablets: 2 columns
      - On mobile: 1 column
*/
.special_ligne {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 14px;
  justify-items: center;
  align-items: stretch;
  overflow: visible !important;     /* no horizontal scroll needed */
  flex-wrap: unset !important;      /* cancel previous flex approach */
}

.special_ligne > .fichier,
.special_ligne > a.fichier {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  white-space: normal;              /* allow wrap inside the card */
  min-height: 48px;
  width: 100%;
  max-width: 420px;                 /* keep a nice readable width */
  transition: transform .2s ease, box-shadow .2s ease;
}

.special_ligne > .fichier:hover,
.special_ligne > a.fichier:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

/* MVV responsive columns */
@media (min-width: 680px) {
  .special_ligne {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (min-width: 992px) {
  .special_ligne {
    grid-template-columns: repeat(3, minmax(220px, 1fr)); /* same line on desktop */
  }
}

/* 2) Fit-content zones for "Pilotage de l’activité" and "Le groupe Serpe"
      Apply class .zone--fit (or data-fit="true") to those specific blocks in the HTML.
*/
.zone--fit,
.dossier.zone--fit,
.dossier_logo.zone--fit,
[data-fit="true"] {
  display: inline-flex;
  flex-direction: column;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;        /* avoid overflow on very small screens */
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

.brand{display:flex; justify-content:center}
.logo{
  max-width:min(520px, 90vw);
  height:auto;
  user-select:none;
  -webkit-user-drag:none;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.02));
}

.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:2rem clamp(1rem, 2vw, 2.25rem);
  inline-size:min(680px, 92vw);
  text-align:center;
}

.badge{
  display:inline-block;
  background:linear-gradient(90deg, var(--brand-green), var(--brand-blue));
  color:#fff;
  font-weight:600;
  letter-spacing:.2px;
  padding:.4rem .75rem;
  border-radius:999px;
  margin:0 0 1rem 0;
}

h1{
  margin:.25rem 0 .5rem;
  font-size:clamp(1.5rem, 2.2vw + 1rem, 2.25rem);
  line-height:1.15;
}

.lead{
  margin:.25rem auto 1.25rem;
  color:var(--muted);
  max-width:50ch;
}

.loader{
  position:relative;
  height:6px;
  background:#ecf1ee;
  border-radius:999px;
  overflow:hidden;
  margin:1rem auto 1.25rem;
}
.loader::before{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg, rgba(11,92,44,.0), rgba(11,92,44,.7), rgba(27,111,169,.8), rgba(11,92,44,.0));
  animation:load 1.8s infinite;
}
@keyframes load{
  0%{transform:translateX(-100%)}
  60%{transform:translateX(10%)}
  100%{transform:translateX(100%)}
}

.links{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:1rem 1.5rem;
  flex-wrap:wrap;
  justify-content:center;
}
.links a{
  color:var(--brand-green);
  font-weight:600;
  text-decoration:none;
  border-bottom:2px solid transparent;
}
.links a:focus,
.links a:hover{
  border-color:color-mix(in srgb, var(--brand-green) 60%, white);
}

/* Ensure inner content doesn't force oversized width */
.zone--fit .fichier { white-space: nowrap; }
.zone--fit .main_fichier { align-items: center; }
