/* PALETTE ET POLICES
 * Modifier ces variables pour ajuster l'identité du site.
 * --yellow : jaune principal (#ffd344). Les couleurs de survol sont dans .action-button:hover.
 * Les polices Bangers et DM Sans sont chargées dans index.html.
 */
:root {
  --ink: #0c0b08;
  --paper: #f7f4ec;
  --yellow: #ffd344;
  --muted: #c1c0b9;
  --line: #383833;
  --font: 'DM Sans',Arial,sans-serif;
  --title: 'Bangers',Impact,sans-serif;
}

/* TOPBAR — coordonnées et sélecteur de langue au-dessus du header.
 * Les coordonnées de la version PHP sont dans config/config.php.
 */
.topbar {
  background: #1c1c19;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 10px;
}

.topbar-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  min-width: 0;
}

.topbar-contact a {
  overflow-wrap: anywhere;
}

.topbar-contact a:hover {
  color: var(--yellow);
}

.contact-pending {
  color: var(--muted);
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Panier : la pastille indique le nombre d'articles dans la liste de location. */
.topbar-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
}

.topbar-cart span {
  background: var(--yellow);
  color: var(--ink);
  border-radius: 50%;
  min-width: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
}

.topbar-cart:hover { color: var(--yellow); }

@media (max-width: 420px) {
  .language-picker { gap: 4px; }
  .topbar-inner { flex-wrap: wrap; }
}

.language-picker label {
  font-size: 12px;
}

.language-picker select {
  width: auto;
  padding: 5px 25px 5px 8px;
  font-size: 12px;
  min-height: 34px;
}

@media (max-width: 700px) {
  .topbar-inner {
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-contact {
    flex-direction: column;
    align-items: flex-start;
    font-size: 11px;
  }

  .language-picker label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .header .action-button.small {
    gap: 10px;
  }
}

/* BASE
 * Le calcul des dimensions inclut les bordures et les espacements intérieurs.
 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* NAVIGATION CLAVIER
 * Conserver un indicateur de focus visible sur les éléments interactifs.
 */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 7px;
}

.paper a:focus-visible {
  outline-color: var(--ink);
}

/* CONTENEUR
 * Largeur maximale du contenu et marges latérales sur ordinateur.
 * Les marges sont adaptées dans les règles responsive en fin de fichier.
 */
.wrap {
  width: min(1200px,calc(100% - 96px));
  margin-inline: auto;
}

/* HEADER ET IDENTITÉ
 * Les largeurs de .brand et .footer-brand contrôlent la taille des logos.
 * Leur hauteur automatique conserve les proportions des fichiers originaux.
 */
.dark-stage {
  overflow: hidden;
  background: radial-gradient(ellipse at 75% 40%,#24241c55,transparent 60%),var(--ink);
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  position: relative;
  z-index: 2;
}

.brand {
  display: block;
  width: 184px;
}

/* Taille des logos publics ; atténuer uniquement l'image du footer. */
.header .brand { width: 160px; }
.footer .footer-brand { width: 104px; }
.footer-brand img { opacity: .65; }

@media(max-width:700px) {
  .header .brand { width: 88px; }
  .footer .footer-brand { width: 88px; }
}

.header nav {
  display: flex;
  align-items: center;
  gap: 38px;
  font-weight: 600;
}

/* Menu principal : liens tactiles et passage sur une seconde ligne sur mobile. */
.header nav > a { min-height: 44px; display: inline-flex; align-items: center; }
.home-cta { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-block: 60px; padding: 38px; border: 1px solid #626257; border-left: 5px solid var(--yellow); border-radius: 6px; background: #1b1b18; }
.home-cta > div { min-width: 0; max-width: 650px; }
.home-cta h2 { font-size: clamp(34px,4vw,52px); margin-block: 14px; }
.home-cta-copy { color: #d2d1c6; font-size: 17px; margin-bottom: 0; }
.home-cta > .action-button { flex-shrink: 0; text-align: center; }
/* À propos : textes traduits dans app/lang/, conteneur commun au site. */
.about-section { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 48px; padding-block: 60px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.about-section h2 { font-size: clamp(36px,4vw,54px); margin-block: 16px 0; }
.about-copy { font-size: 17px; color: #d2d1c6; }
.about-copy p:first-child { margin-top: 0; }
.about-copy .inline-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--yellow); }
.about-contact-button { margin-top: 12px; max-width: 100%; text-align: center; }
@media(max-width:700px) {
  .about-section { grid-template-columns: minmax(0,1fr); gap: 24px; padding-block: 40px; }
}
@media(max-width:700px) {
  .header { flex-wrap: wrap; }
  .header nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .header nav > a:not(.action-button) { font-size: 16px; }
  .home-cta { flex-direction: column; align-items: stretch; padding: 24px; gap: 24px; margin-block: 36px; }
  .home-cta > .action-button { justify-content: center; }
}

.header nav>a:not(.action-button):hover, .footer a:hover {
  color: var(--yellow);
}

/* BOUTONS
 * Fond jaune, coins adoucis et etats hover/focus.
 */
.action-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 15px 28px;
  border: 0;
  border-radius: 5px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s,transform .2s;
}

.action-button:hover {
  background: #ffe17b;
  transform: translateY(-2px);
}

.action-button:active {
  transform: translateY(1px);
}

.action-button.small {
  padding: 11px 27px;
  font-size: 17px;
}

/* HERO
 * Sur ordinateur : texte à gauche, espace réservé aux personnages à droite.
 * Les titres et le bouton restent des éléments HTML éditables.
 */
.hero {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  align-items: center;
  min-height: 665px;
  padding-top: 38px;
  padding-bottom: 76px;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

/* TYPOGRAPHIE
 * .eyebrow : petites accroches ; h1, h2 et h3 : titres en Bangers.
 * clamp() ajuste la taille des titres entre une valeur minimale et maximale.
 */
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.eyebrow span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
}

h1, h2, h3 {
  font-family: var(--title);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1px;
  margin: 0;
}

h1 {
  font-size: clamp(58px,6.6vw,92px);
  transform: rotate(-3deg);
  transform-origin: left center;
  line-height: 1.06;
  margin-bottom: 32px;
}

.intro {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 32px;
}

/* FOND DU HERO
 * Remplacer le visuel dans index.html (assets/hero-sonar.png).
 * object-fit: cover remplit la zone ; object-position règle le cadrage.
 * .hero-art réserve la place nécessaire au visuel, surtout sur mobile.
 */
.hero-stage {
  position: relative;
  background: #000;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.hero-art {
  height: 490px;
  position: relative;
}

/* PRESTATIONS
 * Fond ivoire avec texture discrète. Grille de deux colonnes sur ordinateur.
 */
.paper {
  background: var(--paper);
  color: var(--ink);
  background-image: url('assets/grain.svg');
}

.services {
  padding: 62px 0 65px;
}

.section-heading {
  position: relative;
  text-align: center;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 34px;
}

.section-heading .eyebrow {
  justify-content: center;
  margin-bottom: 16px;
  color: #55554d;
}

.section-heading h2 {
  font-size: clamp(46px,6.6vw,84px);
  transform: rotate(-2deg);
}

.heading-star {
  position: absolute;
  right: 25px;
  bottom: 43px;
  font-size: 50px;
  color: #d6a824;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
}

.service {
  display: grid;
  grid-template-columns: 43% 1fr;
  align-items: center;
  gap: 14px;
  min-height: 280px;
  padding: 16px 18px 20px 0;
  position: relative;
}

.service:nth-child(even) {
  padding-left: 24px;
  padding-right: 0;
}

/* Filet vertical entre les deux colonnes. Les deux premiers blocs
 * portent également un filet horizontal. Ces règles changent sur mobile.
 */
.service:nth-child(odd)::after {
  content: '';
  width: 1px;
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  background: #7f7d75;
}

.service:nth-child(-n+2) {
  border-bottom: 1px solid #7f7d75;
}

.service img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  transition: transform .3s;
}

.service-catalog-button { margin-top: 18px; }

.service:hover img {
  transform: rotate(-3deg) translateY(-3px);
}

.service h3 {
  font-size: clamp(26px,2.8vw,37px);
  line-height: 1.06;
  transform: rotate(-3deg);
  margin-bottom: 20px;
}

.service p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  max-width: 260px;
}

/* CONTACT ET FORMULAIRE
 * Deux colonnes sur ordinateur, une seule sur mobile.
 * Le comportement de copie et les messages du formulaire sont dans script.js.
 */
.contact {
  padding: 82px 0 55px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
}

.contact-copy h2 {
  font-size: clamp(42px,4.8vw,66px);
  line-height: 1.1;
  margin-bottom: 38px;
}

.contact-copy em {
  color: var(--yellow);
  font-style: normal;
}

.contact-copy .eyebrow {
  color: var(--muted);
}

.form-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 23px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 19px;
  min-width: 0;
}

label {
  font-size: 13px;
  font-weight: 500;
}

label span {
  color: var(--yellow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

input, select, textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid #62615a;
  border-radius: 4px;
  background: #1e1e1b;
  color: var(--paper);
  padding: 12px 13px;
  font-size: 14px;
}

input::placeholder, textarea::placeholder {
  color: #a6a59e;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

/* Avertissement d'envoi indisponible et retour de la copie locale.
 * Ne masquer cet avertissement qu'après configuration d'un service d'envoi.
 */
.form-notice {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 22px;
}

.form-status {
  font-size: 13px;
  color: var(--yellow);
  margin: 17px 0 0;
  min-height: 20px;
}

#copy-fallback label {
  display: block;
  margin: 14px 0 8px;
}

/* PIED DE PAGE
 * Logo, signature, navigation et informations secondaires.
 */
.footer {
  padding-bottom: 22px;
}

.footer-main {
  border-top: 1px solid #76766f;
  padding: 28px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer-brand {
  width: 120px;
}

.signature {
  font-size: 12px;
  letter-spacing: 2px;
  margin: 7px 0 0;
}

.signature span {
  margin-inline: 6px;
}

.footer nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
}

.legal-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.legal-link:hover {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 10px;
  color: #a6a59e;
}

/* ACCESSIBILITÉ
 * Lien d'accès direct au contenu, affiché lorsqu'il reçoit le focus clavier.
 */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  background: var(--yellow);
  color: var(--ink);
  padding: 12px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

/* MENTIONS LÉGALES
 * Présentation de la fenêtre modale ; son contenu est dans index.html.
 */
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  padding: 30px;
  max-width: 580px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
}

dialog::backdrop {
  background: #000b;
}

.legal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-heading h2 {
  font-size: 36px;
}

.legal-heading button {
  background: var(--yellow);
  border: 0;
  border-radius: 4px;
  font-size: 28px;
  width: 40px;
  cursor: pointer;
}

dialog p {
  font-size: 15px;
  line-height: 1.6;
}

/* RESPONSIVE - GRANDS ÉCRANS (à partir de 1 400 px)
 * Augmente la hauteur du hero et l'espace réservé au visuel.
 */
@media(min-width:1400px) {
  .hero {
    min-height: 730px;
  }

  .hero-art {
    height: 535px;
  }

}

/* RESPONSIVE - TABLETTES ET PETITS ORDINATEURS (jusqu'à 1 000 px)
 * Réduit les marges, les espacements et certaines tailles de texte.
 */
@media(max-width:1000px) {
  .wrap {
    width: calc(100% - 56px);
  }

  .hero {
    min-height: 570px;
    padding-bottom: 60px;
  }

  .hero-art {
    height: 390px;
  }

  .intro {
    font-size: 19px;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.6px;
  }

  .service {
    grid-template-columns: 40% 1fr;
    gap: 10px;
    min-height: 250px;
  }

  .service p {
    font-size: 16px;
  }

  .contact-grid {
    gap: 40px;
  }

  .heading-star {
    right: 0;
    font-size: 36px;
  }

  .hero .eyebrow {
    max-width: 260px;
  }

}

/* RESPONSIVE - MOBILE (jusqu'à 700 px)
 * Navigation compacte, hero empilé et prestations sur une colonne.
 * Le fond du hero est placé sous le texte pour conserver sa lisibilité.
 * Ces règles prennent le dessus sur les styles précédents.
 */
@media(max-width:700px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .header {
    padding-top: 18px;
  }

  .brand {
    width: 120px;
  }

  .header nav {
    gap: 16px;
    font-size: 12px;
  }

  .action-button.small {
    font-size: 12px;
    padding: 9px 15px;

  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 48px;
    padding-bottom: 54px;
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(56px,11.9vw,83px);
    margin-bottom: 24px;
  }

  .hero .eyebrow {
    max-width: none;
    margin-bottom: 23px;
    font-size: 8px;
  }

  .intro {
    font-size: 18px;
    margin-bottom: 26px;
  }

  .action-button {
    font-size: 16px;
    padding: 14px 23px;

  }

  .hero-art {
    width: min(100%,440px);
    justify-self: center;
    height: 350px;
    margin: 28px 0 0;
  }

  .hero-stage .hero {
    padding-bottom: 0;
  }

  .hero-backdrop {
    top: auto;
    bottom: 0;
    height: 350px;
    object-position: right bottom;
  }

  .hero-art {
    width: 100%;
    height: 350px;
    margin-top: 24px;
  }

  .services {
    padding: 44px 0 36px;
  }

  .section-heading {
    padding-bottom: 25px;
  }

  .section-heading h2 {
    font-size: 51px;
  }

  .section-heading .eyebrow {
    font-size: 8px;
  }

  .heading-star {
    display: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
    margin-top: 8px;
  }

  .service, .service:nth-child(even) {
    grid-template-columns: 39% 1fr;
    gap: 19px;
    padding: 18px 0;
    min-height: 215px;
    border-bottom: 1px solid #7f7d75;
  }

  .service:last-child {
    border-bottom: 0;
  }

  .service:nth-child(odd)::after {
    display: none;
  }

  .service img {
    max-height: 210px;
  }

  .service h3 {
    font-size: 30px;
    margin-bottom: 15px;
  }

  .service p {
    font-size: 16px;
  }

  .contact {
    padding: 48px 0 36px;
  }

  .contact-grid {
    grid-template-columns: minmax(0,1fr);
    gap: 44px;
  }

  .contact-copy h2 {
    font-size: 49px;
    margin-bottom: 25px;
  }

  .contact-copy h2 {
    font-size: clamp(40px,10.8vw,49px);
  }

  .form-title {
    font-size: 18px;
  }

  .footer-main {
    align-items: flex-start;
    padding: 25px 0;
    gap: 25px;
  }

  .footer nav {
    gap: 14px 20px;
    justify-content: flex-end;
    max-width: 170px;
    font-size: 12px;
  }

  .footer-brand {
    width: 100px;
  }

  .signature {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .signature span {
    margin-inline: 3px;
  }

  .footer-bottom {
    font-size: 9px;
    flex-direction: column;
    gap: 6px;
  }

}

/* RESPONSIVE - PETITS MOBILES (jusqu'à 380 px)
 * Marges plus fines et champs du formulaire sur une seule colonne.
 */
@media(max-width:380px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .header nav {
    gap: 10px;
  }

  .brand {
    width: 100px;
  }

  .hero-art {
    height: 295px;
  }

  .hero-backdrop {
    height: 295px;
  }

  .service {
    gap: 12px;
  }

  .service h3 {
    font-size: 27px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer nav {
    max-width: none;
    justify-content: flex-start;
  }

}

/* PRÉFÉRENCE DE RÉDUCTION DES MOUVEMENTS
 * Respecter ce réglage : aucun défilement animé ni transition.
 */
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none!important;
    animation: none!important;
  }

}
