
/*
Theme Name: CAPP Architecture
Theme URI: https://capp-architecture.fr
Description: Thème enfant Minimalio pour CAPP Architecture.
Author: Cédric Angelin
Template: minimalio
Version: 1.0
Text Domain: capp-architecture
*/

/* =========================================
   CAPP ARCHITECTURE — PAGE D'ACCUEIL
   ========================================= */

body.capp-accueil {
    margin: 0;
    background: #ffffff;
}

.capp-accueil #capp-accueil {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 20px 60px;
    box-sizing: border-box;
}

.capp-composition {
    width: 100%;
    max-width: 912px;
    /* Le carré et les informations jusqu’aux pictogrammes tiennent dans la fenêtre, si possible. */
    width: min(912px, calc(100vw - 40px), max(280px, calc(100dvh - 270px)));
    margin: 0 auto;
}

/* Carré photographique */

.capp-diaporama {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e5e5e5;
}

.capp-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Logo fixe superposé */

.capp-logo {
    position: absolute;
    width: 201px;
    max-width: 35%;
    height: auto;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

/* Informations sous le carré */

.capp-informations {
    margin-top: clamp(18px, 3vh, 40px);
    text-align: center;
    color: #555555;
    font-family: 'Montserrat', sans-serif;
}

.capp-informations p {
    margin: 0;
    padding: 0;
}

.capp-nom {
    font-size: 20px;
    letter-spacing: 0.2px;
}

.capp-diplome {
    font-size: 14px;
    margin-top: 3px !important;
}

.capp-activites {
    font-size: 14px;
    font-weight: 600;
    margin-top: clamp(12px, 2vh, 24px) !important;
}

.capp-localisation {
    font-size: 14px;
    margin-top: 4px !important;
}

/* Adaptation aux petits écrans */

@media (max-width: 640px) {

    .capp-accueil #capp-accueil {
        padding: 25px 15px 40px;
    }

    .capp-composition {
        width: 100%;
    }

    .capp-logo {
        width: min(201px, 22%);
    }

    .capp-informations {
        margin-top: 30px;
    }
}

/* =========================================
   SITE EN CONSTRUCTION
   ========================================= */

.capp-accueil .capp-chantier {
    margin-top: 60px !important;
    padding-top: 0 !important;

    text-align: center;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.09em;
    color: #555555;
}

/* =========================================
   CARTE NANTES – FOUESNANT : FENÊTRE RESPONSIVE
   ========================================= */
.capp-lien-carte { appearance: none; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.capp-lien-carte:hover, .capp-lien-carte:focus-visible { font-weight: 700; text-decoration: none; border: 0; outline: none; box-shadow: none; }
body.capp-carte-ouverte { overflow: hidden; }
.capp-modal-carte[hidden] { display: none !important; }
.capp-modal-carte {
    position: fixed; inset: 0; z-index: 99999; display: flex;
    align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
}
.capp-modal-fond { position: absolute; inset: 0; background: rgba(25,25,25,.55); }
.capp-modal-contenu {
    position: relative; width: min(900px, 100%);
    max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
    padding: 25px; box-sizing: border-box; background: #fff;
    box-shadow: 0 12px 45px rgba(0,0,0,.14);
    font-family: 'Montserrat', sans-serif;
    display: flex; flex-direction: column; min-height: 0;
}
.capp-modal-contenu h2 { flex: none; margin: 0 35px 17px 0; font-size: 13px; font-weight: 500; color: #555; letter-spacing: .02em; }
.capp-modal-fermer { position: absolute; top: 12px; right: 17px; z-index: 1; border: 0; padding: 3px 6px; background: transparent; color: #555; font-size: 27px; line-height: 1; cursor: pointer; }
.capp-modal-contenu iframe {
    display: block; width: 100%; height: 500px; min-height: 0;
    max-height: calc(100vh - 155px); max-height: calc(100dvh - 155px);
    flex: 0 1 500px; border: 0; background: #f4f4f4;
}
.capp-carte-plein-ecran { flex: none; align-self: flex-start; display: inline-block; margin-top: 14px; color: #555; font-size: 10px; text-decoration: none; }
.capp-carte-plein-ecran:hover, .capp-carte-plein-ecran:focus-visible { text-decoration: underline; }
@media (max-width: 640px) {
    .capp-modal-carte { padding: 10px; }
    .capp-modal-contenu {
        width: 100%; padding: 16px;
        max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px);
    }
    .capp-modal-contenu h2 { margin-bottom: 12px; }
    .capp-modal-fermer { top: 7px; right: 9px; }
    .capp-modal-contenu iframe {
        height: 65vh; height: 65dvh; flex-basis: 65vh; flex-basis: 65dvh;
        max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px);
    }
    .capp-carte-plein-ecran { margin-top: 10px; }
}

/* Dimensions des pictogrammes et du texte annexe pour le carré de référence 912 px. */
.capp-reseaux a { width: 24px; height: 24px; }
.capp-reseaux { gap: 24px; margin-top: 24px; }
.capp-accueil .capp-chantier { font-size: 13px; }
@media (max-width: 640px) {
    .capp-nom { font-size: 16px; }
    .capp-diplome, .capp-activites, .capp-localisation { font-size: 12px; }
    .capp-reseaux a { width: 20px; height: 20px; }
}

/* Le texte « Site en construction » reste après la composition :
   il n’entre pas dans le calcul de hauteur responsive. */
@media (max-height: 800px) and (min-width: 641px) {
    .capp-accueil #capp-accueil { padding-top: 16px; }
    .capp-informations { margin-top: 18px; }
    .capp-reseaux { margin-top: 14px; }
}


/* Mentions légales : lien discret sous « Site en construction ». */
.capp-mentions-lien { margin: 12px 0 0; text-align: center; }
.capp-mentions-lien button { appearance: none; border: 0; background: transparent; padding: 2px 4px; font: 400 10px 'Montserrat', sans-serif; color: #777; cursor: pointer; }
.capp-mentions-lien button:hover, .capp-mentions-lien button:focus-visible { color: #333; text-decoration: underline; }
body.capp-mentions-ouvertes { overflow: hidden; }
.capp-modal-mentions[hidden] { display: none !important; }
.capp-modal-mentions { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.capp-mentions-fond { position: absolute; inset: 0; background: rgba(25,25,25,.55); }
.capp-mentions-contenu { position: relative; box-sizing: border-box; width: min(760px, calc(100vw - 40px)); aspect-ratio: 1 / 1; max-height: calc(100dvh - 40px); padding: clamp(20px, 4vw, 38px); background: #fff; box-shadow: 0 12px 45px rgba(0,0,0,.14); font-family: 'Montserrat', sans-serif; display: flex; flex-direction: column; min-height: 0; }
.capp-mentions-contenu h2 { flex: none; margin: 0 35px 22px 0; font-size: 14px; font-weight: 600; color: #444; letter-spacing: .04em; }
.capp-mentions-fermer { position: absolute; top: 12px; right: 17px; border: 0; background: transparent; color: #555; font-size: 27px; line-height: 1; padding: 3px 6px; cursor: pointer; }
.capp-mentions-texte { flex: 1; min-height: 0; overflow-y: auto; padding-right: 12px; color: #555; font-size: 12px; line-height: 1.65; overscroll-behavior: contain; }
.capp-mentions-texte h3 { margin: 19px 0 7px; font-size: 12px; font-weight: 700; color: #333; }
.capp-mentions-texte h3:first-child { margin-top: 0; }
.capp-mentions-texte p { margin: 0 0 11px; }
@media (max-width: 640px), (max-height: 700px) {
  .capp-modal-mentions { padding: 10px; }
  .capp-mentions-contenu { width: min(100%, 760px); height: min(100dvh - 20px, 760px); max-height: calc(100dvh - 20px); aspect-ratio: auto; padding: 20px 17px; }
  .capp-mentions-texte { font-size: 11px; padding-right: 6px; }
  .capp-mentions-fermer { top: 7px; right: 9px; }
}


/* =========================================
   CV : 4e pictogramme + fenêtre PDF
   ========================================= */
.capp-reseaux .capp-bouton-cv {
    appearance: none; border: 0; background: transparent; padding: 0; margin: 0;
    width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
    color: inherit; cursor: pointer;
}
.capp-reseaux .capp-bouton-cv svg {
    width: 100%; height: 100%; display: block; fill: none; stroke: currentColor;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.capp-reseaux .capp-bouton-cv:hover,
.capp-reseaux .capp-bouton-cv:focus-visible { opacity: .62; outline: none; }

body.capp-cv-ouvert { overflow: hidden; }
.capp-modal-cv[hidden] { display: none !important; }
.capp-modal-cv {
    position: fixed; inset: 0; z-index: 100001; display: flex;
    align-items: center; justify-content: center; padding: 20px; box-sizing: border-box;
}
.capp-cv-fond { position: absolute; inset: 0; background: rgba(25,25,25,.55); }
.capp-cv-contenu {
    position: relative; width: min(820px, calc(100vw - 40px));
    height: min(90dvh, 980px); padding: 25px; box-sizing: border-box;
    background: #fff; box-shadow: 0 12px 45px rgba(0,0,0,.14);
    font-family: 'Montserrat', sans-serif; display: flex; flex-direction: column; min-height: 0;
}
.capp-cv-contenu h2 {
    flex: none; margin: 0 35px 17px 0; font-size: 13px; font-weight: 500;
    color: #555; letter-spacing: .02em;
}
.capp-cv-fermer {
    position: absolute; top: 12px; right: 17px; z-index: 1; border: 0;
    padding: 3px 6px; background: transparent; color: #555; font-size: 27px;
    line-height: 1; cursor: pointer;
}
.capp-cv-contenu iframe {
    display: block; width: 100%; flex: 1; min-height: 0; border: 0; background: #f4f4f4;
}
.capp-cv-ouvrir {
    flex: none; align-self: flex-start; display: inline-block; margin-top: 14px;
    color: #555; font-size: 10px; text-decoration: none;
}
.capp-cv-ouvrir:hover, .capp-cv-ouvrir:focus-visible { text-decoration: underline; }
.capp-cv-attente {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; color: #666; font-size: 12px; line-height: 1.65;
}
.capp-cv-attente p { margin: 4px 0; }
@media (max-width: 640px) {
    .capp-reseaux .capp-bouton-cv { width: 20px; height: 20px; }
    .capp-modal-cv { padding: 10px; }
    .capp-cv-contenu { width: 100%; height: calc(100dvh - 20px); padding: 16px; }
    .capp-cv-fermer { top: 7px; right: 9px; }
}

/* Survol colore, sobre et harmonise des quatre liens. */
.capp-accueil .capp-reseaux a,
.capp-accueil .capp-reseaux .capp-bouton-cv {
  color: #454545; opacity: .75; transition: color .22s ease, opacity .22s ease;
}
.capp-accueil .capp-reseaux a:hover,
.capp-accueil .capp-reseaux a:focus-visible,
.capp-accueil .capp-reseaux .capp-bouton-cv:hover,
.capp-accueil .capp-reseaux .capp-bouton-cv:focus-visible { opacity: 1; }
.capp-accueil .capp-reseaux .capp-instagram:hover,
.capp-accueil .capp-reseaux .capp-instagram:focus-visible { color: #d94686; }
.capp-accueil .capp-reseaux .capp-linkedin:hover,
.capp-accueil .capp-reseaux .capp-linkedin:focus-visible { color: #0a66c2; }
.capp-accueil .capp-reseaux .capp-vimeo:hover,
.capp-accueil .capp-reseaux .capp-vimeo:focus-visible { color: #1ab7ea; }
.capp-accueil .capp-reseaux .capp-bouton-cv:hover,
.capp-accueil .capp-reseaux .capp-bouton-cv:focus-visible { color: #66876f; }

/* Indications au survol et au clavier : sans texte permanent. */
.capp-accueil .capp-reseaux { overflow: visible; }
.capp-accueil .capp-reseaux a,
.capp-accueil .capp-reseaux .capp-bouton-cv { position: relative; }
.capp-accueil .capp-reseaux [data-infobulle]::after {
    content: attr(data-infobulle); position: absolute; left: 50%; bottom: calc(100% + 9px);
    transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
    background: #fff; border: 1px solid #dedede; border-radius: 3px;
    box-shadow: 0 3px 12px rgba(0,0,0,.06); color: #444;
    padding: 5px 8px; font: 500 10px/1.3 'Montserrat',sans-serif;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 30;
}
.capp-accueil .capp-reseaux [data-infobulle]:hover::after,
.capp-accueil .capp-reseaux [data-infobulle]:focus-visible::after {
    opacity: 1; visibility: visible; transform: translate(-50%,0);
}
.capp-accueil .capp-reseaux .capp-bouton-cv,
.capp-accueil .capp-reseaux .capp-bouton-cv svg { width: 24px; height: 24px; }
@media (max-width:640px) {
 .capp-accueil .capp-reseaux .capp-bouton-cv,
 .capp-accueil .capp-reseaux .capp-bouton-cv svg { width:20px; height:20px; }
}
