/* ==========================================================================
   Tob Solutions : styles du site

   Sommaire
   1. Réglages (couleurs, espacements)    6. Prestations
   2. Bases                               7. Réalisations
   3. Titres, boutons et liens            8. Témoignages
   4. En-tête et pied de page             9. Contact
   5. Premier écran                      10. Mentions légales

   Les styles sont écrits d’abord pour le téléphone. Les blocs
   « @media (min-width: …) » les adaptent ensuite aux écrans plus larges :
   48rem = tablette, 64rem = ordinateur (1rem = 16 pixels).
   ========================================================================== */


/* 1. Réglages : modifiez ces valeurs pour changer tout le site
   ========================================================================== */

:root {
  /* Couleurs de la marque */
  --bleu-nuit: #0B1230;        /* grandes surfaces */
  --bleu: #2D5BFF;             /* actions principales */
  --vert-citron: #C9F03D;      /* en petite touche */
  --bleu-clair: #6F93FF;       /* accent, sur fond sombre seulement */
  --texte: #111827;

  /* Couleurs complémentaires */
  --blanc: #FFFFFF;
  --bleu-survol: #1F45D6;      /* bouton survolé */
  --bleu-pale: #E4EAFF;        /* fond de la section Réalisations */
  --texte-sur-nuit: #C3CCE6;

  /* Espacements */
  --espace-xs: 0.5rem;
  --espace-s: 1rem;
  --espace-m: 1.5rem;
  --espace-l: 2.5rem;
  --espace-section: 5rem;      /* vide en haut et en bas de chaque section */
  --marge-page: 1.25rem;       /* vide à gauche et à droite de l’écran */

  /* Largeur maximale du contenu */
  --largeur-page: 84rem;

  /* Sur ordinateur, début de la colonne de droite (voir « .grille ») */
  --debut-colonne: calc(25% + 1.875rem);

  /* Contour affiché lors de la navigation au clavier */
  --couleur-focus: var(--bleu);
}

@media (min-width: 48rem) {
  :root {
    --espace-section: 7rem;
    --marge-page: 2.5rem;
  }
}

@media (min-width: 64rem) {
  :root {
    --espace-section: 8rem;
  }
}


/* 2. Bases
   ========================================================================== */

/* Manrope est la police du logo. Elle est hébergée avec le site. */
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

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

/* Défilement doux, sauf si le visiteur a demandé moins d’animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body,
h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}

body {
  background: var(--blanc);
  color: var(--texte);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* Évite un mot seul sur la dernière ligne */
p {
  text-wrap: pretty;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
}

.conteneur {
  max-width: calc(var(--largeur-page) + 2 * var(--marge-page));
  margin-inline: auto;
  padding-inline: var(--marge-page);
}

.section {
  padding-block: var(--espace-section);
}

.fond-nuit {
  --couleur-focus: var(--vert-citron);
  background: var(--bleu-nuit);
  color: var(--blanc);
}

/* Évite un filet clair entre deux blocs bleu nuit quand la page est zoomée */
.accueil,
footer {
  margin-top: -1px;
}

/* Grille commune : le titre de section, puis le contenu.
   Sur ordinateur, le titre passe dans une colonne étroite à gauche. */
.grille {
  display: grid;
  gap: var(--espace-l);
}

@media (min-width: 64rem) {
  .grille {
    grid-template-columns: 3fr 9fr;
    gap: 0 var(--espace-l);
  }
}


/* 3. Titres, boutons et liens
   ========================================================================== */

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

/* Grands titres. vw = pourcentage de la largeur de l’écran. */
.titre-geant {
  font-size: clamp(2rem, 10.2vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.titre-geant > span {
  display: block;
  text-wrap: balance;          /* équilibre la longueur des lignes */
}

.titre-geant > span:last-child {
  margin-top: 0.1em;
}

.ligne-fine {
  font-weight: 300;
}

/* Ordinateur : une phrase par ligne, la seconde alignée sur la colonne de droite */
@media (min-width: 64rem) {
  .titre-geant {
    font-size: clamp(2.75rem, 4.4vw, 4rem);
    line-height: 1.15;
  }

  .titre-geant > span:last-child {
    margin-left: var(--debut-colonne);
  }
}

/* Le point rond du logo, à la place du point de la police */
.point {
  position: relative;
  display: inline-block;
  width: 0.24em;
  color: transparent;
}

.point::after {
  content: "";
  position: absolute;
  bottom: 0.2em;
  left: 0.05em;
  width: 0.19em;
  height: 0.19em;
  border-radius: 50%;
  background: var(--vert-citron);
}

.titre-section h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.titre-section p {
  margin-top: var(--espace-xs);
}

/* Ordinateur : aligne le titre de gauche sur la première ligne de contenu */
@media (min-width: 64rem) {
  .titre-section {
    padding-top: 2.25rem;
  }

  .realisations .titre-section {
    padding-top: 0.75rem;
  }
}

a {
  color: inherit;
  text-underline-offset: 0.3em;
}

:focus-visible {
  outline: 3px solid var(--couleur-focus);
  outline-offset: 4px;
}

main:focus {
  outline: none;
}

/* Bouton principal. Un angle droit et trois angles arrondis, comme le logo. */
.bouton {
  display: inline-block;
  padding: 1.25rem 2rem;
  border-radius: 0 1.125rem 1.125rem 1.125rem;
  background: var(--bleu);
  color: var(--blanc);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s;
}

.bouton:hover {
  background: var(--bleu-survol);
}

/* Bouton secondaire, sur fond clair */
.bouton-contour {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--texte);
  border-radius: 0 0.875rem 0.875rem 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.bouton-contour:hover {
  background: var(--texte);
  color: var(--blanc);
}

/* Lien secondaire : un texte souligné */
.lien {
  display: inline-block;
  padding-block: 0.5rem;
  font-weight: 700;
  text-decoration-color: var(--bleu-clair);
  text-decoration-thickness: 2px;
}

.lien:hover {
  text-decoration-color: currentColor;
}

/* Lien visible uniquement au clavier, avec la touche Tab */
.lien-evitement {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.75rem 1.25rem;
  background: var(--blanc);
  color: var(--bleu);
  font-weight: 700;
  transform: translateY(-200%);
}

.lien-evitement:focus {
  transform: none;
}


/* 4. En-tête et pied de page
   ========================================================================== */

.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--espace-xs) var(--espace-m);
  padding-block: var(--espace-s);
}

/* Le fichier du logo contient une zone vide à droite. Ces réglages la masquent
   sans déformer le dessin. Pour changer la taille, modifiez seulement « height ». */
.logo {
  width: auto;
  height: 3rem;
  aspect-ratio: 168 / 64;
  object-fit: cover;
  object-position: left center;
}

.navigation {
  display: flex;
  gap: clamp(1rem, 5vw, 1.5rem);
}

.navigation a {
  display: block;
  padding-block: 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

.navigation a:hover {
  text-decoration: underline;
  text-decoration-color: var(--vert-citron);
  text-decoration-thickness: 2px;
}

.pied {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--espace-xs) var(--espace-l);
  padding-bottom: var(--espace-l);
  color: var(--texte-sur-nuit);
  font-size: 1rem;
}

/* Zone tactile plus haute, sans décaler le texte */
.pied a {
  display: inline-block;
  margin-block: -0.625rem;
  padding-block: 0.625rem;
}

.pied a:hover {
  color: var(--blanc);
}

@media (min-width: 48rem) {
  .entete {
    padding-block: var(--espace-l) var(--espace-m);
  }

  .logo {
    height: 3.5rem;
  }

  .navigation {
    gap: var(--espace-l);
  }
}


/* 5. Premier écran
   ========================================================================== */

.accueil {
  padding-block: var(--espace-s) 3.5rem;
}

.accueil-suite {
  display: grid;
  justify-items: start;
  gap: var(--espace-m);
  margin-top: var(--espace-m);
}

.accueil-suite > p {
  max-width: 40rem;
  color: var(--texte-sur-nuit);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.accueil-action .bouton {
  display: block;
}

.accueil-action p {
  margin-top: 0.75rem;
  font-size: 1rem;
}

@media (min-width: 48rem) {
  .accueil {
    padding-block: 4rem 6rem;
  }

  .accueil-suite {
    gap: var(--espace-l);
    margin-top: 3.5rem;
  }

  .accueil-suite > p {
    font-size: 1.3125rem;
    line-height: 1.6;
  }
}

/* Ordinateur : le texte s’aligne sur la colonne de contenu des autres sections */
@media (min-width: 64rem) {
  .accueil-suite {
    grid-template-columns: 1fr auto;
    align-items: start;
    margin-left: var(--debut-colonne);
  }
}


/* 6. Prestations
   ========================================================================== */

/* Moins de vide en haut : les prestations apparaissent plus tôt */
#prestations {
  padding-top: 4rem;
}

.prestation {
  display: grid;
  gap: var(--espace-s);
  padding-block: var(--espace-l);
  border-top: 2px solid var(--texte);
}

.prestation h3 {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem);
  text-wrap: balance;
}

/* « Vous pouvez commencer par l’essentiel. » */
.essentiel h3 {
  font-size: clamp(2.5rem, 4.2vw, 3.875rem);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.essentiel-texte {
  display: grid;
  gap: var(--espace-s);
  max-width: 42rem;
  margin-top: var(--espace-m);
}

/* Équilibre la longueur des lignes */
.essentiel strong {
  display: block;
  text-wrap: balance;
}

@media (min-width: 48rem) {
  .prestation {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--espace-l);
  }

  .essentiel-texte {
    font-size: 1.3125rem;
  }
}

@media (min-width: 64rem) {
  .prestation {
    padding-block: 2rem 3.5rem;
  }

  /* Occupe toute la largeur, sous les trois prestations */
  .essentiel {
    grid-column: 1 / -1;
    margin-top: 4rem;
  }

  .essentiel-texte {
    margin-left: var(--debut-colonne);
  }
}


/* 7. Réalisations
   ========================================================================== */

.realisations {
  background: var(--bleu-pale);
}

.realisations-liste {
  display: grid;
  gap: 4rem;
}

.pixprotect {
  display: grid;
  gap: var(--espace-l);
}

.pixprotect h3 {
  font-size: 2.75rem;
}

.pixprotect-texte {
  max-width: 34rem;
}

.pixprotect-texte p {
  margin-top: var(--espace-s);
}

.pixprotect-resume {
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.4;
  text-wrap: balance;
}

/* Liens vers l’App Store et Google Play */
.magasins {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block: var(--espace-m) var(--espace-s);
}

.pixprotect .lien {
  color: var(--bleu-survol);
  text-decoration-color: currentColor;
}

/* La capture de l’appli, dans un cadre de téléphone */
.telephone {
  width: 17.5rem;
  max-width: 100%;
}

.telephone img {
  width: 100%;
  height: auto;
  border: 0.625rem solid var(--bleu-nuit);
  border-radius: 2.25rem;
}

.telephone figcaption {
  margin-top: var(--espace-s);
  font-size: 1rem;
  line-height: 1.5;
}

.tob-idel {
  display: grid;
  gap: var(--espace-m);
  padding: var(--espace-m);
  border-radius: 0 1.5rem 1.5rem 1.5rem;
}

.tob-idel h3 {
  font-size: 2.25rem;
}

.statut {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: var(--espace-xs);
  font-weight: 700;
}

.statut::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--vert-citron);
}

/* Tablette et ordinateur : le texte à gauche, le téléphone à droite */
@media (min-width: 48rem) {
  .pixprotect {
    grid-template-columns: 1fr auto;
  }

  .tob-idel {
    grid-template-columns: 1fr 1.6fr;
    align-items: center;
    gap: var(--espace-l);
    padding: var(--espace-l);
  }
}


/* 8. Témoignages (section masquée dans index.html pour le moment)
   ========================================================================== */

.temoignages {
  display: grid;
  gap: var(--espace-l);
  padding-top: var(--espace-l);
  border-top: 2px solid var(--texte);
}

.temoignages blockquote {
  font-size: 1.5rem;
  line-height: 1.45;
}

.temoignages figcaption {
  margin-top: var(--espace-s);
}


/* 9. Contact
   ========================================================================== */

.contact-suite {
  display: grid;
  justify-items: start;
  gap: var(--espace-m);
  margin-top: var(--espace-l);
}

.contact-texte {
  display: grid;
  gap: var(--espace-s);
  max-width: 42rem;
  color: var(--texte-sur-nuit);
}

/* Exemples de messages */
.contact-texte li {
  color: var(--blanc);
}

.contact-texte li + li {
  margin-top: var(--espace-xs);
}

.contact-texte strong {
  color: var(--blanc);
}

.adresse {
  padding-block: 0.625rem;
  font-size: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-decoration-color: var(--bleu-clair);
  text-decoration-thickness: 2px;
}

.adresse:hover {
  text-decoration-color: currentColor;
}

@media (min-width: 64rem) {
  .contact-suite {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--espace-l);
    margin-top: 4rem;
    margin-left: var(--debut-colonne);
  }

  .contact-texte {
    grid-column: 1 / -1;
    font-size: 1.3125rem;
  }
}


/* 10. Mentions légales
   ========================================================================== */

.mentions {
  max-width: 46rem;
  padding-block: var(--espace-l) var(--espace-section);
}

.mentions h1 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.mentions h2 {
  margin-top: 3rem;
  margin-bottom: var(--espace-s);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.mentions p + p {
  margin-top: var(--espace-s);
}

.mentions dl {
  margin: 0;
}

.mentions dt {
  margin-top: var(--espace-s);
  font-weight: 700;
}

.mentions dd {
  margin: 0;
}

@media (min-width: 48rem) {
  .mentions dl {
    display: grid;
    grid-template-columns: 15rem 1fr;
    gap: 0.75rem var(--espace-m);
  }

  .mentions dt {
    margin-top: 0;
  }
}
