summaryrefslogtreecommitdiff
path: root/commun.css
blob: e49d1c850dfe9e8436097d9fa4a9faa1c344e553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
body {
    margin: 0;
    background-color: #acf;
}

.current {
    background-color: white;
}

header a, .contact a {
    text-decoration: none;
}

header a, footer a {
    color: inherit;
}

header.banner a {
    display: flex;
    align-items: center;
}
header.banner img {
    width: 10rem;
    filter: brightness(0%);
    transition: filter 1s;
}
header.banner:hover img {
    filter: brightness(100%) sepia(100%);
}
header.banner h1 {
    margin: 0;
    font-size: 1.5rem;
    transition: color 1s;
}
header.banner:hover h1 {
    color: #d82;
}

@media (min-width: 40em) {
    .togglable > input.toggle, .togglable > img.button {
        display: none;
    }

    body {
        min-height: 100vh;
        display: grid;
        grid-template-columns: 2fr 1fr 3fr 1fr 1fr;
        grid-template-rows: auto 1fr auto;
    }

    header.banner {
        grid-column: 1;
    }

    header.menu {
        grid-column: 3 / -1;
    }
    header.menu > div {
        display: grid;
        grid-template-columns: 3fr 1fr 1fr;
    }

    header.menu nav {
        grid-column: 1;
        margin-top: 2rem;
    }
    header.menu .lang {
        grid-column: 3;
    }

    nav > ol {
        display: flex;
        align-items: center;
        align-content: stretch;
        flex-wrap: wrap;
        padding-left: 0;
        text-align: center;
        list-style-type: none;
    }

    nav > ol > li {
        flex: 1;
    }

    nav > ol > li > a {
        display: block;
        padding: 0.5em 0.1em;
    }

    nav li.dropdown {
        position: relative;
    }
    nav li.dropdown ul {
        position: absolute;
        padding-left: 0;
        width: 100%;
        text-align: left;
        background: lightgrey;
        z-index: 1;

        overflow: hidden;
        max-height: 0;
        transition: max-height 0.5s;
    }
    nav li.dropdown:hover ul {
        /* ⚠ Magic constant: must be big enough to show the whole dropdown,
       but not too big otherwise the transition will be "delayed". */
        max-height: 5em;
    }
    nav li.dropdown > ul > li {
        list-style-type: none;
    }
    nav li.dropdown > ul > li:hover {
        background: white;
    }
    nav li.dropdown > ul > li a {
        display: block;       /* Make link span whole containing block. */
        padding-inline-start: 10%;
    }
    nav li.dropdown > ul > li a img {
        width: 1em;
        height: 1em;
    }

    .lang {
        grid-column: 5;
        background-color: black;
        border-radius: 50% 50% 50% 0;
        color: white;
        padding: 0.5em;
        margin: auto;
        margin-top: 3rem;
    }

    main {
        grid-row: 2;
        grid-column: 1 / -2;
        padding-left: 4%;
    }

    footer.social {
        grid-row: 2;
        grid-column: 5;
        position: sticky;
        top: 0;
    }

    footer.social > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .social img {
        width: 2em;
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

    .contact {
        /* Ideally should be just: */
        /* writing-mode: sideways-lr; */
        /* but of course We Can't Have Nice Things. */
        writing-mode: vertical-rl;
        transform: rotate(180deg);

        margin: 0;
        padding: 1em 0.5em;
    }

    footer.legal {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
        margin: auto;
        font-size: 75%;
    }
}